<template>
  <div>
    <h2>计算属性</h2>
    <input type="text" v-model="xing">
    <input type="text" v-model="ming">
    {{fullName}}
    {{fullName}}
    {{fullName}}
    {{getUserName()}}
    {{getUserName()}}
    {{getUserName()}}
  </div>
</template>

<script>
export default {
  data(){
    return{
      xing:'张',
      ming:'三'
    }
  },
  computed: {
    fullName(){
      console.log('被调用了')
      return this.xing + this.ming
    }
  },
  methods: {
    getUserName(){
      console.log('方法被调用了')
      return this.xing + this.ming
    }
  }
}
</script>

<style lang="">
  
</style>